package com.paschino.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.paschino.dao.AlbumDAO;
import com.paschino.modal.Album;

@Service
@Transactional
public class AlbumServiceImpl implements AlbumService {

	@Autowired
	private AlbumDAO albumDAO;

	@Override
	public boolean addAlbum(Album album) {
		return albumDAO.addAlbum(album);
	}

	@Override
	public boolean updateAlbum(Album album) {
		return albumDAO.updateAlbum(album);
	}

	@Override
	public Album getAlbum(Integer id) {
		return albumDAO.getAlbum(id);
	}

	@Override
	public List<Album> getAlbumList() {
		return albumDAO.getAlbumList();
	}
	
	@Override
	public List<Album> getAlbumListByActive() {
		return albumDAO.getAlbumListByActive();
	}
	
	@Override
	public Album getAlbumByName(String name){
		return albumDAO.getAlbumByName(name);
	}

	@Override
	public List<Album> getLibraryAlbum(){
		return albumDAO.getLibraryAlbum();
	}
	
	@Override
	public int deleteAlbum(int albumID){
		return albumDAO.deleteAlbum(albumID);
	}
	
	@Override
	public int hideAlbum(int albumID){
		return albumDAO.hideAlbum(albumID);
	}
	
	@Override
	public int unhideAlbum(int albumID){
		return albumDAO.unhideAlbum(albumID);
	}
}
